home *** CD-ROM | disk | FTP | other *** search
/ Minami 56 / MINAMI56.ISO / Extra / winamp505_full.exe / $R0 / Winamp Modern / titlebar.maki (.txt) < prev    next >
Winamp Compiled Maki Script  |  2004-07-01  |  4KB  |  117 lines

  1. /* Note: a decompiler is no invitation to steal code.
  2.    Please respect the the copyright */
  3.  
  4. #include "std.mi"
  5. Global GuiObject GuiObject16;
  6. Global GuiObject GuiObject17;
  7. Global GuiObject GuiObject18;
  8. Global Text Text19;
  9. Global Layer Layer20;
  10. Global Group Group21;
  11. Global Int Int22;
  12. Global Int Int23;
  13.  
  14. Function func864();
  15.  
  16. System.onScriptLoaded()
  17. {
  18. Int22 = 0;
  19. Int23 = 0;
  20. Group21 = System.getScriptGroup();
  21. if(( Group21 == Null)) {
  22. System.messageBox(( "titlebar\.maki\ can\ only\ run\ within\ a\ group"), ( "Error"), 0, ( ""));
  23. return Null;
  24. }
  25. GuiObject16 = Group21.findObject(System.getToken(System.getParam(), ( "\;"), 0));
  26. GuiObject18 = Group21.findObject(System.getToken(System.getParam(), ( "\;"), 1));
  27. if(( GuiObject18 != Null)) {
  28. Text19 = GuiObject18.findObject(( "window\.titlebar\.title"));
  29. Layer20 = GuiObject18.findObject(( "window\.titlebar\.title\.overlay"));
  30. }
  31. GuiObject17 = Group21.findObject(System.getToken(System.getParam(), ( "\;"), 2));
  32. return Null;
  33. }
  34.  
  35. Int Group21.onNotify(String command, String param, int a, int b)
  36. {
  37. String String34;
  38. String String33;
  39. String33 = System.getToken(command, ( "\,"), 0);
  40. String34 = System.getToken(command, ( "\,"), 1);
  41. if(( ( String33 == ( "padtitleright")) || ( String33 == ( "padtitleright")))) {
  42. System.onSetXuiParam(String33, String34);
  43. }
  44. return Null;
  45. }
  46.  
  47. System.onSetXuiParam(String param, String value)
  48. {
  49. if(( param == ( "padtitleright"))) {
  50. Int23 = ( Int23 + System.StringToInteger(value));
  51. func864();
  52. }
  53. if(( param == ( "padtitleleft"))) {
  54. Int22 = ( Int22 + System.StringToInteger(value));
  55. func864();
  56. }
  57. return Null;
  58. }
  59.  
  60. func864()
  61. {
  62. Int Int40;
  63. Int Int41;
  64. Int Int39;
  65. Int Int43;
  66. Layout Layout42;
  67. Int39 = 0;
  68. Int40 = 0;
  69. Int41 = Group21.getWidth();
  70. Layout42 = Group21.getParentLayout();
  71. Int40 = Layout42.getWidth();
  72. if(( GuiObject18 != Null)) {
  73. Int39 = GuiObject18.getAutoWidth();
  74. }
  75. Int43 = ( ( Int40 - Int39) / 2);
  76. Int43 = Layout42.clientToScreenX(Int43);
  77. Int43 = Group21.screenToClientX(Int43);
  78. Int43 = ( Int43 - Group21.getLeft());
  79. if(( GuiObject18 != Null)) {
  80. GuiObject18.setXmlParam(( "x"), System.integerToString(Int43));
  81. GuiObject18.setXmlParam(( "relatx"), ( "0"));
  82. GuiObject18.setXmlParam(( "w"), System.integerToString(Int39));
  83. GuiObject18.setXmlParam(( "relatw"), ( "0"));
  84. Layer20.setXmlParam(( "x"), System.integerToString(Int43));
  85. Layer20.setXmlParam(( "relatx"), ( "0"));
  86. Layer20.setXmlParam(( "w"), System.integerToString(Int39));
  87. Layer20.setXmlParam(( "relatw"), ( "0"));
  88. }
  89. if(( GuiObject16 != Null)) {
  90. GuiObject16.setXmlParam(( "x"), System.integerToString(Int22));
  91. GuiObject16.setXmlParam(( "relatx"), ( "0"));
  92. GuiObject16.setXmlParam(( "w"), System.integerToString(( ( Int43 - Int22) - 0)));
  93. GuiObject16.setXmlParam(( "relatw"), ( "0"));
  94. }
  95. if(( GuiObject17 != Null)) {
  96. GuiObject17.setXmlParam(( "x"), System.integerToString(( ( ( Int43 + Int39) + 0) + 1)));
  97. GuiObject17.setXmlParam(( "relatx"), ( "0"));
  98. GuiObject17.setXmlParam(( "w"), ( ( "\-") + System.integerToString(( ( ( ( ( Int43 + Int39) + 1) + Int23) + 0) + 1))));
  99. GuiObject17.setXmlParam(( "relatw"), ( "1"));
  100. }
  101. return Null;
  102. }
  103.  
  104. Text19.onTextChanged(String newtxt)
  105. {
  106. func864();
  107. return Null;
  108. }
  109.  
  110. Group21.onResize(int x, int y, int w, int h)
  111. {
  112. func864();
  113. return Null;
  114. }
  115.  
  116.  
  117.